package com.tongda.core.enums;

public enum DinnerStatusEnum {
	IDLE("1", "空闲"), USING("2", "使用中"), WAITCLEAR("3", "待清台"), STOP("4", "停用"), SETTLE(
			"5", "结账"), ORDER("6", "预订");

	public final static String enumCode = "DinnerStatus";
	public final static String enumName = "餐台就餐状态";

	private String code;
	private String desc;

	DinnerStatusEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public static String getDesc(String code) {
		for (DinnerStatusEnum status : DinnerStatusEnum.values()) {
			if (status.getCode().equalsIgnoreCase(code)) {
				return status.getDesc();
			}
		}
		return "";
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

}
